package com.cib.icarus.desensitize;

import com.cib.icarus.core.utils.ClassUtils;

/**
 * @author goomba
 */
public class JsonChecker {


    public static boolean isJacksonPresent() {
        return ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", JsonChecker.class.getClassLoader())
                && ClassUtils.isPresent("com.fasterxml.jackson.core.JsonGenerator", JsonChecker.class.getClassLoader());
    }

    public static boolean isFastjsonPresent() {
        return ClassUtils.isPresent("com.alibaba.fastjson.JSON", JsonChecker.class.getClassLoader());
    }

    public static boolean isGsonPresent() {
        return ClassUtils.isPresent("com.google.gson.Gson", JsonChecker.class.getClassLoader());
    }


}
